{% extends "base.html" %}
{% block header %}编辑权限{% endblock %}
{% block content %}
<div class="container py-4">
    <div class="row justify-content-center">
        <div class="col-lg-6">
            <div class="card shadow-sm rounded">
                <div class="card-body">
                    <h3 class="mb-4">编辑权限</h3>
                    <form method="post">
                        {% csrf_token %}
                        <div class="mb-3">
                            <label for="name" class="form-label">权限名称</label>
                            <input type="text" class="form-control" id="name" name="name" value="{{ perm.name }}" required>
                        </div>
                        <div class="mb-3">
                            <label for="codename" class="form-label">权限标识</label>
                            <input type="text" class="form-control" id="codename" name="codename" value="{{ perm.codename }}" required>
                        </div>
                        <div class="d-flex justify-content-between">
                            <button type="submit" class="btn btn-success">保存</button>
                            <a href="/permissions/" class="btn btn-secondary ms-2">取消</a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
